<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>果蔬预定管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li ><a href="${ctx}/sys/orderProduct/showGardenStuff"> 果蔬预定管理</a></li>
		<li class="active"><a href="${ctx}/sys/orderProduct/editUserOrderU/${tbOrder.id}">修改果蔬预定订单状态</a></li>
	</ul><br/>
	<form:form id="inputForm"  action="${ctx}/sys/orderProduct/editGudenStuffState" method="post" class="form-horizontal">
		<input type="hidden" name="id" value="${tbOrder.id}"/>
		<%--<form:hidden path="id"/>--%>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">商品名称:</label>
			<div class="controls">
				<c:forEach items="${editTbOrderProductList}" var="editPro" varStatus="st">
					<c:if test="${(st.index+1)<endlen}">
						${editPro.productName},
					</c:if>
					<c:if test="${(st.index+1)==endlen}">
						${editPro.productName}
					</c:if>

				</c:forEach>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">商品价格:</label>
			<div class="controls">
				<c:forEach items="${editTbOrderProductList}" var="editPro" varStatus="st">
					<c:if test="${(st.index+1)<endlen}">
						${editPro.price},
					</c:if>
					<c:if test="${(st.index+1)==endlen}">
						${editPro.price}
					</c:if>

				</c:forEach>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">商品数量:</label>
			<div class="controls">
				<c:forEach items="${editTbOrderProductList}" var="editPro"  varStatus="st">
					<c:if test="${(st.index+1)<endlen}">
						${editPro.quantity},
					</c:if>
					<c:if test="${(st.index+1)==endlen}">
					${editPro.quantity}
					</c:if>
				</c:forEach>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">订单总额:</label>
			<div class="controls">
			${tbOrder.orderAmount}

			</div>
		</div>
		<div class="control-group">
			<label class="control-label">订单联系人:</label>
			<div class="controls">
				${tbOrder.contactName}
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">联系电话:</label>
			<div class="controls">
				${tbOrder.contactMobile}
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">订单状态:</label>
			<div class="controls">

				<input type="radio"  name="state" value="0" <c:if test="${tbOrder.orderState=='0'}">checked</c:if>/>未确认(未支付)
				<input type="radio"  name="state" value="1"<c:if test="${tbOrder.orderState=='1'}">checked</c:if>/>已确认(已支付)
				<input type="radio"  name="state" value="2"<c:if test="${tbOrder.orderState=='2'}">checked</c:if>/>待发货
				<input type="radio"  name="state" value="3"<c:if test="${tbOrder.orderState=='3'}">checked</c:if>/>已发货
				<input type="radio"  name="state" value="4"<c:if test="${tbOrder.orderState=='4'}">checked</c:if>/>已完成
				<input type="radio"  name="state" value="5"<c:if test="${tbOrder.orderState=='5'}">checked</c:if>/>已取消
				<input type="radio"  name="state" value="6"<c:if test="${tbOrder.orderState=='6'}">checked</c:if>/>已关闭

			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="sys:menu:edit">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="修改状态"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
<script type="text/javascript">

</script>
</body>
</html>